package com.open.party.cloud.viewModel

import cn.android.x.model.data.AppPageData
import cn.android.x.model.data.PageReq
import cn.android.x.model.data.ResultInfo
import com.open.party.cloud.ServerConfig
import com.open.party.cloud.model.*
import com.open.party.cloud.model.data.Api
import com.sinothk.rxretrofit.RxRetrofit
import org.greenrobot.eventbus.EventBus
import rx.Subscriber
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers

class BizViewModel() {

    /**
     * 获取云课列表 > 我的学习布局
     */
    fun getMyYunkePageData(pageReq: PageReq<YunKeVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getMyYunkePageData(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<YunKeRecordBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<YunKeRecordBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getMyYunkePageData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<YunKeRecordBean>>) {
                    result.eventType = "getMyYunkePageData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    /**
     * 获取云课列表
     */
    fun getYunkePageData(pageReq: PageReq<YunKeVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getYunkePageData(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<YunKeBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<YunKeBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getYunkePageData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<YunKeBean>>) {
                    result.eventType = "getYunkePageData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    fun getYunkePlayListData(lmmId: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getYunkePlayListData(lmmId)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<ArrayList<YunKePlayBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<ArrayList<YunKePlayBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getYunkePlayListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<ArrayList<YunKePlayBean>>) {
                    result.eventType = "getYunkePlayListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    fun submitSuggestion(vo: SuggestionVo) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .submitSuggestion(vo)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<SuggestionBean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<SuggestionBean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "submitSuggestion"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<SuggestionBean>) {
                    result.eventType = "submitSuggestion"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 1280举报》反馈查询
    fun getReplyByCode(code: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getReplyByCode(code)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<JuBaoChaXunBean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<JuBaoChaXunBean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getReplyByCode"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<JuBaoChaXunBean>) {
                    result.eventType = "getReplyByCode"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党务秘书 》 投票管理列表>>
    fun getTouPiaoGuanListData(pageReq: PageReq<TouPiaoGuanVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getTouPiaoGuanListData(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<TouPiaoGuanBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<TouPiaoGuanBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getTouPiaoGuanListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<TouPiaoGuanBean>>) {
                    result.eventType = "getTouPiaoGuanListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党务秘书 》 投票详情>>
    fun getTouPiaoGuanDetail(id: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getTouPiaoGuanDetail(id)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<TouPiaoGuanBean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<TouPiaoGuanBean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getTouPiaoGuanDetail"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<TouPiaoGuanBean>) {
                    result.eventType = "getTouPiaoGuanDetail"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党务秘书 》 投票保存>>
    fun saveTouPiaoGuanLiResult(saveVO: TouPiaoGuanLiSaveVO) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .saveTouPiaoGuanLiResult(saveVO)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<Boolean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<Boolean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "saveTouPiaoGuanLiResult"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<Boolean>) {
                    result.eventType = "saveTouPiaoGuanLiResult"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党务秘书 》 问卷列表>>
    fun getDiaoChaWenJuanListData(pageReq: PageReq<DiaoChaWenJuanVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL)
            .create(Api::class.java)
            .getDiaoChaWenJuanListData(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<DiaoChaWenJuanListBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<DiaoChaWenJuanListBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getDiaoChaWenJuanListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<DiaoChaWenJuanListBean>>) {
                    result.eventType = "getDiaoChaWenJuanListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 举报12380 》 提交>>
    fun putJuBaoInfo(vo: JuBaoVo) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .putJuBaoInfo(vo)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<JuBaoBean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<JuBaoBean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "putJuBaoInfo"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<JuBaoBean>) {
                    result.eventType = "putJuBaoInfo"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党务秘书 》 问卷详情>>
    fun getDiaoChaWenJuanDetail(id: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getDiaoChaWenJuanDetail(id)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<DiaoChaWenJuanBean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<DiaoChaWenJuanBean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getDiaoChaWenJuanDetail"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<DiaoChaWenJuanBean>) {
                    result.eventType = "getDiaoChaWenJuanDetail"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党务秘书 》 问卷提交结果>>
    fun submitDiaoChaWenJuanResultSet(submitBean: DiaoChaWenJuanSubmitBean) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .submitDiaoChaWenJuanResultSet(submitBean)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<Boolean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<Boolean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "submitDiaoChaWenJuanResultSet"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<Boolean>) {
                    result.eventType = "submitDiaoChaWenJuanResultSet"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党员干部教育 》 考试试题详情>>
    fun getPeiXunKaoShiDetail(id: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getPeiXunKaoShiDetail(id)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<PeiXunKaoShiInfoBean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<PeiXunKaoShiInfoBean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getPeiXunKaoShiDetail"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<PeiXunKaoShiInfoBean>) {
                    result.eventType = "getPeiXunKaoShiDetail"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 基层党建 》村社区列表>>
    fun getCommunityList(name: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getCommunityList(name)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<ArrayList<TownshipBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<ArrayList<TownshipBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getCommunityList"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<ArrayList<TownshipBean>>) {
                    result.eventType = "getCommunityList"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 基层党建 》web > 村社区列表>>
    fun getTownWebList(name: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getTownWebList(name)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<ArrayList<TownshipBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<ArrayList<TownshipBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getTownWebList"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<ArrayList<TownshipBean>>) {
                    result.eventType = "getTownWebList"
                    EventBus.getDefault().post(result)
                }
            })
    }

    fun getPartyServiceArticleList(pageReq: PageReq<ArticleVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getPartyServiceArticleList(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<ArticleEntity>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<ArticleEntity>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getPartyServiceArticleList"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<ArticleEntity>>) {
                    result.eventType = "getPartyServiceArticleList"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党组织 》 组织列表
    fun getPartyOrgList(parentId: String) {

        val pageReq = PageReq<PartyOrgVo>()
        val vo = PartyOrgVo()
        vo.parentId = parentId
        pageReq.data = vo
        pageReq.pageNo = 1
        pageReq.pageSize = 500

        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeaderTest())
            .create(Api::class.java)
            .getPartyOrgList(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<ArrayList<PartyOrgBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<ArrayList<PartyOrgBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getPartyOrgList"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<ArrayList<PartyOrgBean>>) {
                    result.eventType = "getPartyOrgList"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党组织 》 组织成员列表
    fun getPartyMemberListData(pageReq: PageReq<PartyMemberVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getPartyMemberListData(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<PartyMemberBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<PartyMemberBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getPartyMemberListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<PartyMemberBean>>) {
                    result.eventType = "getPartyMemberListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // // 党组织 》 市委组织成部列表
    fun getOrgForCityCommListData(pageReq: PageReq<PartyOrgVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getOrgForCityCommListData(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<OrgDeptBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<OrgDeptBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getOrgForCityCommListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<OrgDeptBean>>) {
                    result.eventType = "getOrgForCityCommListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 党组织 》 市委组织成部列表》成员列表
    fun getOrgForCityCommMemberListData(deptId: String) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getOrgForCityCommMemberListData(deptId)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<ArrayList<OrgEmpBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<ArrayList<OrgEmpBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getOrgForCityCommMemberListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<ArrayList<OrgEmpBean>>) {
                    result.eventType = "getOrgForCityCommMemberListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 基础党建 》 党员发展》步骤列表
    fun getDangYuanFaZhanListData() {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .dangYuanFaZhanListData
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<HashMap<String, ArrayList<PartyDevBean>>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<HashMap<String, ArrayList<PartyDevBean>>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getDangYuanFaZhanListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<HashMap<String, ArrayList<PartyDevBean>>>) {
                    result.eventType = "getDangYuanFaZhanListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    fun getDyfzFileListData(pageReq: PageReq<PartyDevVo>) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .getDyfzFileListData(pageReq)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<AppPageData<PartyDevFileBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<AppPageData<PartyDevFileBean>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getDyfzFileListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<AppPageData<PartyDevFileBean>>) {
                    result.eventType = "getDyfzFileListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    fun getMineViewData() {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .mineViewData
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<MineCountBean>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<MineCountBean>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getMineViewData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<MineCountBean>) {
                    result.eventType = "getMineViewData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    // 公务员管理 》 业务指南
    fun getGongWuYuanGuanLiListData() {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .gongWuYuanGuanLiListData
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<ArrayList<BizGuideBean>>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<HashMap<String, ArrayList<PartyDevBean>>>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "getGongWuYuanGuanLiListData"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<ArrayList<BizGuideBean>>) {
                    result.eventType = "getGongWuYuanGuanLiListData"
                    EventBus.getDefault().post(result)
                }
            })
    }

    fun submitClassMemberCheck(vo: ExamineClassMemberCheckVo) {
        RxRetrofit.init(ServerConfig.SERVER_URL, ServerConfig.getHeader())
            .create(Api::class.java)
            .submitClassMemberCheck(vo)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(object : Subscriber<ResultInfo<String>>() {

                override fun onCompleted() {}

                override fun onError(e: Throwable) {
                    val result = ResultInfo<String>(ResultInfo.ERROR, ResultInfo.getErrorMsg(e.message))
                    result.eventType = "submitClassMemberCheck"
                    EventBus.getDefault().post(result)
                }

                override fun onNext(result: ResultInfo<String>) {
                    result.eventType = "submitClassMemberCheck"
                    EventBus.getDefault().post(result)
                }
            })
    }
}